package main

import "fmt"

func commaLeft(s string) string {
	n := len(s)

	if n <= 3 { // 这里得加等于
		return s;
	}

	return commaLeft(s[:n-3]) + "," + commaLeft(s[n-3:]) // 递归啊
}

func commaRight(s string) string {
	n := len(s)

	if n <= 3 {
		return s
	}

	return commaRight(s[0:3]) + "," + commaRight(s[3:]);
}

func main() {
	var s string
	fmt.Scan(&s)
	s = commaLeft(s)
	fmt.Printf("【result】:%s", s)
}

// P109 P111
